package com.gskj.eduservice.client;

/**
 * @author : Connor-G 康纳-郭
 * @date : 18:57 20.8.19
 * @Company : http://www.gskj.club
 * @Version : 1.0
 */

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 订单模块调用 远程接口服务
 */
//TODO 暂时不处理 熔断
@FeignClient(name = "service-order")
@Component
public interface OrderClient {

    /**
     * 调用远程 订单方法 ，查询 当前课程是否已购买
     *
     * @param memberId
     * @param courseId
     * @return
     */
    @GetMapping("/eduorder/order/isbuy/course/{mid}/{cid}")
    public Boolean checkStatsByMidAndOid(
            @PathVariable("mid") String memberId,
            @PathVariable("cid") String courseId);
}

